﻿<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="RSSFeedCars.aspx.vb" Inherits="Final_Web_2._0_site_1.RSSFeedCars" %>


    <asp:SqlDataSource ID="MercedesSqlDataSource" runat="server" 
    ConnectionString="<%$ ConnectionStrings:MercedesConnectionString %>" 
    ProviderName="<%$ ConnectionStrings:MercedesConnectionString.ProviderName %>" 
    SelectCommand="SELECT [CarModelName], [CarModelYear], [CC], [CarColour],[CarID] FROM [Car]">
</asp:SqlDataSource>

<asp:Repeater ID="Repeater1" runat="server" DataSourceID="MercedesSqlDataSource">

<HeaderTemplate>
<rss version="2.0">
 <channel>
  <title>Mercedes C-Class Car</title>
   <description>List of latest C-class Cars</description>
</HeaderTemplate>
<ItemTemplate>
    <item>
     <title><%# FormatForXML(DataBinder.Eval(Container.DataItem, "CarModelName"))%></title>
     <link> CarInDetail.aspx?ID=<%# FormatForXML(DataBinder.Eval(Container.DataItem, "CarID"))%>
     </link>
     <description>  
      Model Year :  <%# FormatForXML(DataBinder.Eval(Container.DataItem, "CarModelYear"))%>     
     CC : <%# FormatForXML(DataBinder.Eval(Container.DataItem, "CC"))%>  
     Colour :  <%# FormatForXML(DataBinder.Eval(Container.DataItem, "CarColour"))%> 
     </description>  
    </item>
</ItemTemplate>

<FooterTemplate>
   </channel>
  </rss>
 </FooterTemplate>
</asp:Repeater>